package com.drug.mingkang.config;

import com.drug.mingkang.security.interceptor.SessionInterceptor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

import javax.annotation.Resource;

/**
 * 描述：配置拦截器
 *
 * @version 1.0
 * @author: wcj
 * @Date: 2020/8/3 15:22
 */
@Configuration
public class WebSecurityConfig implements WebMvcConfigurer {

    @Resource
    public SessionInterceptor sessionInterceptor;


    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        //所有访问都要进入SessionInterceptor拦截器进行登录验证，
//        registry.addInterceptor(sessionInterceptor).addPathPatterns("/**")
//        .excludePathPatterns("/ok-admin/**",
//                "/res/**","/admin/**","/img/**",
//                "/perUsers/findUserName",
//                "/hqImm/queryAll","/send/**");
    }

}
